.pageContainer {
  display: flex;
  width: 100%;
  height: 100vh;
  background: #f0f2f5;
}

.sideMenu {
  width: 200px;
  background: #fff;
  border-right: 1px solid #f0f0f0;
  transition: all 0.2s;

  &.collapsed {
    width: 80px;
  }

  .menuHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
  }

  .menuTitle {
    font-size: 14px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
  }

  .triggerButton {
    padding: 0;
    font-size: 16px;
  }

  .menu {
    border-right: none;
  }

  .menuList {
    .menuItem {
      padding: 12px 16px;
      color: rgba(0, 0, 0, 0.65);
      cursor: pointer;
      transition: all 0.3s;

      &:hover {
        color: #1890ff;
        background: #e6f7ff;
      }
    }
  }
}

.mainContainer {
  flex: 1;
  padding: 16px;
  overflow: auto;
}

.content {
  background: #fff;
  border-radius: 4px;
  padding: 24px;
}

.searchBar {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;

  .searchItem {
    display: flex;
    align-items: center;
    gap: 8px;

    span {
      color: rgba(0, 0, 0, 0.85);
      white-space: nowrap;
    }
  }

  :global {
    .ant-btn {
      margin-left: 8px;
    }
  }
}

.table {
  :global {
    .ant-table-thead > tr > th {
      background: #f0f5ff;
      color: rgba(0, 0, 0, 0.85);
      font-weight: 500;
    }

    .ant-table-tbody > tr > td {
      color: rgba(0, 0, 0, 0.65);
    }

    .ant-table-tbody > tr:hover > td {
      background: #f0f5ff;
    }

    .ant-pagination {
      margin: 16px 0;
    }

    .ant-table-cell {
      text-align: center;
    }
  }
}

.title {
  text-align: center;
  font-size: 18px;
  margin-bottom: 30px;
  color: #333;
}

.irrigationSystem {
  position: relative;
  width: 100%;
  height: 600px;
  background: #f8f9fa;
  border-radius: 4px;
}

.mainCanal {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  width: 80%;
}

.waterReservoir {
  background: #1890ff;
  padding: 10px;
  color: white;
  border-radius: 4px;
  text-align: center;
}

.branchSystem {
  position: absolute;
  top: 150px;
  width: 100%;
  display: flex;
  justify-content: space-around;

  > div {
    background: #91d5ff;
    padding: 8px;
    border-radius: 4px;
  }
}

.branchLabels {
  position: absolute;
  top: 250px;
  width: 100%;

  .yellowBranch {
    background: #faad14;
    padding: 8px;
    margin: 10px;
    border-radius: 4px;
    display: inline-block;
  }
}

.pumpStations {
  position: absolute;
  bottom: 30px;
  width: 100%;
  display: flex;
  justify-content: space-around;

  .station {
    background: #fff;
    padding: 8px;
    border: 1px solid #1890ff;
    border-radius: 4px;
  }
}

.statistics {
  position: absolute;
  right: 20px;
  top: 20px;
  width: 300px;
  background: white;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);

  .statsTitle {
    padding: 10px;
    border-bottom: 1px solid #e8e8e8;
  }

  .statsTable {
    width: 100%;
    border-collapse: collapse;

    th, td {
      padding: 8px;
      text-align: center;
      border: 1px solid #e8e8e8;
    }

    th {
      background: #fafafa;
    }
  }
}

.legend {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: white;
  padding: 15px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);

  .legendTitle {
    margin-bottom: 10px;
    text-align: center;
  }

  .legendItems {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .legendItem {
    display: flex;
    align-items: center;
    gap: 5px;

    span:first-child {
      width: 20px;
      height: 20px;
      display: inline-block;
    }
  }
}

// 图例样式
.blue {
  background: #1890ff;
}

.star {
  background: url('star.png') no-repeat center/contain;
}

.gate {
  background: url('gate.png') no-repeat center/contain;
}

.dottedLine {
  border-bottom: 2px dashed #91d5ff;
}

.yellowLine {
  border-bottom: 2px solid #faad14;
}

.reservoir {
  background: #1890ff;
  border-radius: 50%;
}

.pumpStation {
  background: url('pump.png') no-repeat center/contain;
}

:global {
  .ant-menu-inline-collapsed {
    width: 80px;
  }

  .ant-menu-inline-collapsed > .ant-menu-item {
    padding: 0 24px !important;
  }
} 